home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib6
/
v_08_07
/
8n07115a
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-11-01
|
386 b
|
18 lines
/* Listing 1 - Sample of Inheritance */
#define S1_CLASS int x; \
int y; \
int (*read_x)(); \
int (*read_y)();
typedef struct s1 {
S1_CLASS
} S1;
#define S2_CLASS S1_CLASS \
int z; \
int (*read_z)(); \
typedef struct s2 {
S2_CLASS
} S2;